///Users/liligang/Documents/进击的iOS/练习代码/03/02/Weibo-14/01-Weibo项目练习-1/01-Weibo项目练习-1/Classes/View/LGHomeViewController.swift
//  LGHomeViewController.swift
//  01-Weibo项目练习-1
//
//  Created by 李李刚 on 16/3/2.
//  Copyright © 2016年 李李刚. All rights reserved.
//

import UIKit

class LGHomeViewController: LGVisaViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        

        
        if isLogon{
            
            
            
            
        }else{
            
           self.baseView.setpageinfo(nil, message: nil)
            
            
            // 放到下面,因为没有登录的时候左右两边的按钮都是登录和注册
            return
            
        }
        
        
    // 放到下面,因为没有登录的时候左右两边的按钮都是登录和注册
        setupUI()
        
        

    }

    func setupUI(){

        
       let leftbutton = UIBarButtonItem(imageName: "navigationbar_friendsearch", title: nil, target: self, action: nil)
        
        navigationItem.leftBarButtonItem = leftbutton
        
        navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: "navigationbar_pop", title: nil , target: self, action: "pop")
        
        
    }
    
    
    
    
    func pop(){
        
        print("码克")
        
        //初始化一个新的控制器
        let vc = UIViewController()
        
        vc.view.backgroundColor = UIColor.purpleColor()
        
        //跳转控制器
        
        navigationController?.pushViewController(vc, animated: true)
        
    }
    
    
    
    
    
    
    
    
}
